import Notify, {$notify} from "@hhd/plat/Dialog";
import PageLoading from '@hhd/plat/PageLoading/index.vue'
import $loading from '@hhd/plat/PageLoading/PageLoadingUtil'
import HorizontalAnimation from '@hhd/plat/HorizontalAnimation/HorizontalAnimation.vue'
import RefreshList from '@hhd/plat/RefreshList/index.vue';
import ListItem from "@hhd/plat/RefreshList/ListItem.vue";
import ListItemRow from "@hhd/plat/RefreshList/ListItemRow.vue";
import FlowStatusTag from '@hhd/plat/FlowStatusTag/index.vue';
import {globalPropertiesPlugin} from "@utils";
import CommonLayout from '@hhd/plat/CommonLayout/index.vue'
import FadeAnimation from '@hhd/plat/FadeAnimation/index.vue'
import SwipTab from "@hhd/plat/SwipTab/SwipTab.vue";
import SwipTabPanel from "@hhd/plat/SwipTab/SwipTabPanel.vue";

let components = [
  Notify,
  FadeAnimation,
  ListItem,
  FlowStatusTag,
  HorizontalAnimation,
  PageLoading,
  ListItemRow,
  CommonLayout,
  SwipTab,
  SwipTabPanel,
  RefreshList
]
let plugin = {
  install(app: any) {
    app.use(globalPropertiesPlugin);
    app.config.globalProperties.$notify = $notify
    app.config.globalProperties.$loading = $loading
    for (let i = 0; i < components.length; i++) {
      app.component(components[i].name, components[i])
    }
  },
}
export default plugin
export {
  $notify,
  $loading,
  Notify,
  FadeAnimation,
  ListItem,
  FlowStatusTag,
  HorizontalAnimation,
  PageLoading,
  ListItemRow,
  CommonLayout,
  SwipTab,
  SwipTabPanel,
  RefreshList
};